package com.ay277.htqoa.staff.entity;

import com.ay277.htqoa.base.entity.BaseEntity;
import com.ay277.htqoa.base.entity.User;

import javax.persistence.*;
import java.util.Date;

/**
 * Created by accp09 on 2016/12/7.
 */
@Entity
@Table(name="td_Employee")
public class Employee extends BaseEntity{
    private String Ename;
    private Date time;
    private Department department;
    private String cardID;
    private String job;
    private String status;
    private double sal;
    private String empno;
    private User  login;
    @ManyToOne
    @JoinColumn(name = "login_id",unique = true)
    public User getLogin() {
        return login;
    }

    public void setLogin(User login) {
        this.login = login;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getEmpno() {
        return empno;
    }

    public void setEmpno(String empno) {
        this.empno = empno;
    }

    public String getEname() {
        return Ename;
    }

    public void setEname(String ename) {
        Ename = ename;
    }


    public Date getTime() {
        return time;
    }

    public void setTime(Date time) {
        this.time = time;
    }

    @ManyToOne
    @JoinColumn(name = "departmentId")
    public Department getDepartment() {
        return department;
    }

    public void setDepartment(Department department) {
        this.department = department;
    }

    public String getCardID() {
        return cardID;
    }

    public void setCardID(String cardID) {
        this.cardID = cardID;
    }

    public String getJob() {
        return job;
    }

    public void setJob(String job) {
        this.job = job;
    }



    public double getSal() {
        return sal;
    }

    public void setSal(double sal) {
        this.sal = sal;
    }
}
